﻿using Song.Common.Tools;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace Test.Unit
{
    
    
    /// <summary>
    ///This is a test class for RandomExtensionsTest and is intended
    ///to contain all RandomExtensionsTest Unit Tests
    ///</summary>
    [TestClass()]
    public class RandomExtensionsTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for NextBool
        ///</summary>
        [TestMethod()]
        public void NextBoolTest()
        {
            Random random = null; // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = RandomExtensions.NextBool(random);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for NextBytes
        ///</summary>
        [TestMethod()]
        public void NextBytesTest()
        {
            Random random = null; // TODO: Initialize to an appropriate value
            int length = 0; // TODO: Initialize to an appropriate value
            byte[] expected = null; // TODO: Initialize to an appropriate value
            byte[] actual;
            actual = RandomExtensions.NextBytes(random, length);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for NextDateTime
        ///</summary>
        [TestMethod()]
        public void NextDateTimeTest()
        {
            Random random = null; // TODO: Initialize to an appropriate value
            DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value
            DateTime actual;
            actual = RandomExtensions.NextDateTime(random);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for NextDateTime
        ///</summary>
        [TestMethod()]
        public void NextDateTimeTest1()
        {
            Random random = null; // TODO: Initialize to an appropriate value
            DateTime minValue = new DateTime(); // TODO: Initialize to an appropriate value
            DateTime maxValue = new DateTime(); // TODO: Initialize to an appropriate value
            DateTime expected = new DateTime(); // TODO: Initialize to an appropriate value
            DateTime actual;
            actual = RandomExtensions.NextDateTime(random, minValue, maxValue);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for NextEnum
        ///</summary>
        public void NextEnumTestHelper<T>()
            where T : struct
        {
            Random random = null; // TODO: Initialize to an appropriate value
            T expected = new T(); // TODO: Initialize to an appropriate value
            T actual;
            actual = RandomExtensions.NextEnum<T>(random);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        [TestMethod()]
        public void NextEnumTest()
        {
            Assert.Inconclusive("No appropriate type parameter is found to satisfies the type constraint(s) of T. " +
                    "Please call NextEnumTestHelper<T>() with appropriate type parameters.");
        }
    }
}
